import React from "react";
import ReactDOM from "react-dom/client";

// const content = "千锋";
// const element = <h1 title={content}>Hello {content}</h1>;
const content = "<input />";

// // {} 会对 html 文本进行转义处理，以防止 XSS
// const element = <div title={content}>Hello {content}</div>;

// 如果要渲染 html，可使用 dangerouslySetInnerHTML
const element = (
  <div title={content}>
    Hello <div dangerouslySetInnerHTML={{ __html: content }}></div>
  </div>
);

const root = ReactDOM.createRoot(document.getElementById("root"));
root.render(element);
